package com.xcode.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;
import com.xcode.bean.table.User;
import com.xcode.mapper.UserMapper;
import com.xcode.util.URLManager;

@Controller
public class index
{
	@Autowired
	private UserMapper mapper;
	
	@RequestMapping(URLManager.index)
	public String in(HttpServletRequest request,HttpServletResponse response)
	{
		User user = mapper.selectUserById(1);
		System.out.println(user.getName());
		return "/index";
	}
	
	@RequestMapping(URLManager.upload)
	public void FileUpload(@RequestParam("fileupload")MultipartFile file,HttpServletRequest request,HttpServletResponse response)
	{
		
	}
	
}
